For a computer system to provide a wide range of functionality to users, it must be able to incorporate various devices into the system, i.e., allow different devices to send data to the system to be used in system applications. These devices can include such hardware as, for example, a keyboard, a mouse, a compact disk player, a modem, a video display, a scanner, a printer, and a Universal Serial Bus (USB) interface (to name only a few), and may also include software applications, either associated with these hardware devices (e.g., drivers) or as independent applications. The difficulty posed in receiving data from such devices is that each device is relatively autonomous, and thus each device may have data to send to the system at any time, and sometimes at the same time as other devices. Where two devices attempt to send data at the same time, the data from one (or both) of the devices may be lost due to the xe2x80x9ccontentionxe2x80x9d for system resources caused by the data xe2x80x9ccollision.xe2x80x9d
Various methods have been employed to process the data provided by these devices in order to avoid the loss of data from contention. One such method incorporates data into the computer system by having the system xe2x80x9cpollxe2x80x9d each device connected to the system at a regular interval to check if any data is ready to be transmitted by the device. This method may be called xe2x80x9csynchronous,xe2x80x9d since each device in effect has its own time slot for transmitting data to the computer system. The problems with this polling method are that it requires significant system overhead to perform the polling (even when many devices do not have data to send), and it cannot account for devices that have a large amount of data to send in a short period of time (i.e., more data than can be handled in the time slot assigned to the device).
Another method for servicing the data transmission needs of devices is the generation and reception of xe2x80x9cinterrupts.xe2x80x9d A device would transmit an interrupt signal to the system whenever it had data to transmit to the system, and when the system receives the interrupt, it immediately executes an interrupt handling routine to receive the data from the interrupting device. This method is asynchronous, since the device may generate an interrupt at any time (regardless of the system state), and the system processes the interrupt as soon as it is received. Although this method reduces the processing requirements of the system compared to the polling method, the possibility of missed data exists where a number of devices make interrupt requests at the same time (or at least before the system can complete a previously executed interrupt handling routine). Where many devices are connected to the system, or where the devices connected to the system transmit large quantities of data, interrupt contention can be a serious concern.
An improvement on the basic asynchronous interrupt method described above assigns priorities to various types of interrupts, such that high priority interrupts are processed before low priority interrupts. This scheme may alleviate data loss for devices that are assigned a high priority, but may further accentuate data loss for low priority devices, since it may take even longer to execute the interrupt handling routine for these low priority devices.
The problem of data loss due to interrupt contention is exacerbated by the use of more data intensive devices. For example, using a video camera (e.g., in a video teleconferencing application) generates large amounts of data to represent the video images, which may encounter interference from data generated by compact disk players (CD-ROMs) to play audio and/or video, high-speed modems and network connections.
A method for processing interrupts is implemented according to the present invention. The method includes receiving a first interrupt during a first time period, delaying the execution of a first interrupt handling routine corresponding to the first interrupt until a second time period, and executing the first interrupt handling routine before the end of the second time period. An interrupt handling system is also implemented according to the present invention. The interrupt handling system includes a number of interrupt inputs, at least one interrupt output, and an interrupt controller coupled to the number of interrupt inputs and the at least one interrupt output. The interrupt controller includes an isochronous interrupt controller to process at least one isochronous interrupt request received via at least one of the number of interrupt inputs during a first time period, and to generate an interrupt signal at the at least one interrupt output during a second time period.